package com.graduationproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduationproject.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author shkstart
 * @create 2023-12-19-14:01
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    User login(String username,String password);

    void register(User user);

    void updateStatusLogin(String username);

    void updateStatusLogout(String username);

    User getUserInfo(String username);

    void updateUser( String username, String height, String weight, Integer userId,String labor,String years);

    @Select("select * from user where del_flag = 0")
    List<User> findUserPage();

    int findTotal();

//    User findById(Integer id);

    void userPut(User user);

//    void deleteUser(int id);

    void updateUserSmall(User user);
}
